package com.bjpowernode.boss.web.controller;

import com.bjpowernode.boss.common.enums.AjaxCode;
import com.bjpowernode.boss.db.domain.DicPayType;
import com.bjpowernode.boss.db.mapper.DicPayTypeMapper;
import com.bjpowernode.boss.web.models.dto.DicPayTypeDto;
import com.bjpowernode.boss.web.models.result.AjaxResult;
import com.bjpowernode.boss.web.service.PayTypeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

import static com.bjpowernode.boss.PaymentApplication.CACHEMAP;

/**
 * 支付类型控制
 *
 * @author shenlang
 * @date 2024-06-04 21:44
 * @version
 * TODO 添加描述
 */

@Controller
@ResponseBody
public class PayTypeController {
    @Resource
    PayTypeService payTypeService;
    @RequestMapping("/type/getPayTypeOptions")
    public AjaxResult getPayTypeOptions(@RequestParam String wayCode){
        List<DicPayTypeDto> dicPayTypes = payTypeService.getPayTypeOptions(wayCode);
        return new AjaxResult(AjaxCode.OPTIONS_GET_SUCCESS,dicPayTypes);
    }
}
